<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>exam system</title>
<link rel="shortcut icon" href="/html/images/favicon.ico" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="/Public/Home/css/global.css" />
<link rel="stylesheet" type="text/css" href="/Public/Home/css/account.css" />
</head>
<body class="global_formList global_form global_table">
<div class="global_head">
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<div class="inner">
            <!-- <div class="logo" onclick="window.location.href='/';" id="busi_move">
                <img src="/html/images/global_logo.png" alt="活动树"
                    id="huodongshu_logo" style="">
            </div> -->
            <div class="nav">
                <ul>
                    <li id="id_li_event"><a href="<?php echo U('/Home/index');?>">首页</a></li>
                    <li id="id_li_myevent" class="choose"><a href="<?php echo U('/Home/index/choosePaper');?>">在线答题</a></li>
                    <li id="id_li_account"><a href="<?php echo U('/Home/index/account');?>">个人中心</a></li>
                </ul>
            </div>
            <ul class="login" id="changeclass">
            <?php if($loginName != ''): ?><li><span id="huodongshu_welcome_span"><?php echo ($loginName); ?></span>
                    <a href="<?php echo U('/Home/Check/loginOut',array('from'=>'index'));?>"> | 退出</a>
                </li>
            <?php else: ?>
                 <li class="">
                    <a id="huodongshu_login" href="<?php echo U('/Home/Check/login',array('from'=>'index'));?>">登录 | </a>
                    <a id="huodongshu_register" href="/html/register.html">注册</a>
                </li><?php endif; ?>
            </ul>
</div>
</div>

<form id="account_base" name="account_base" method="post" action="<?php echo U('saveBase');?>">
<div class="global_width">
			<div class="global_leftMenu">
				<div class="menuTitle">
					<span class="icon icon01"></span>我的账户
				</div>
				<div class="menuBody">
					<dl>
						<dt class="choose">
							<span class="icon menu01"></span> <a
								href="<?php echo U('account');?>">基本信息</a> <span
								class="arrow"></span>
						</dt>
						<dt class="last">
							<span class="icon menu01"></span> <a
								href="<?php echo U('results');?>">成绩查询</a> <span class="arrow"></span>
						</dt>
					</dl>
				</div>
			</div>
			<div class="global_right global_form">
        <div class="rightTitle font_green01"><span class="line"></span>账户信息</div>
        <div class="rightBody account_info" uiselect="click">
                <div class="fList_wide fListW_90_410_160">
                <!--用户名 -->
                <ul>
                    <li class="title">用户名</li>
                    <li class="form"><span id="account_username"><?php echo ($loginName); ?></span></li>
                </ul>
               
                  <!--真实姓名 -->
                <ul>
                    <li class="title">学号</li>
                    <li class="form"><input type="text" class="input_big input_400x40" id="number" name="number" value="<?php echo ($account['number']); ?>"></li>
                   <!--  <li class="required">*</li> -->
                    <li class="tips" id="error_number"> </li>

                </ul>
                
                  <!--图像 -->
                <!--  <ul>
                    <li class="title">头像</li>
                    <li class="form file_ok" id="img_account_logo_src_li">
                          <div class="fileImg">
                            <span> 
                               <img id="img_account_logo_src" src="http://m.huodongshu.com/file/custlogo/20160607/20160607143354_78115..jpeg">
                            </span>
                            </div>
                         
                       
                            <a href="#" class="btn_small btn_gray btn_110x30">浏览上传
                                <input type="file" name="account_logo" id="account_logo_id" class="file" onchange="javascript:hds_preview_pic(this,'img_account_logo_src','img_account_logo_src_li');">
                                <input type="hidden" name="cust_hidden_info" value="">
                            </a>
                             <p class="font_999999">图片尺寸为：100像素x100像素，图片不得超过150K</p>
                            <div class="clear"></div>
                          
                    </li>
                    <li class="required">*</li>
                    <li class="tips" id="error_account_logo"> </li>
                </ul> -->
                
                
               
                  <!--性别 -->
                 <ul>
                    <li class="title">性别</li>
                    <li class="form">
                         <span class="radioSpan">
                         <?php if(($account['gender']) == "0"): ?><input id="gender_1" name="gender" type="radio" class="radio" value="0" checked="checked">男　
                         <?php else: ?>
                            <input id="gender_1" name="gender" type="radio" class="radio" value="0">男　<?php endif; ?>
                        </span>
                        <span class="radioSpan">
                        <?php if(($account['gender']) == "1"): ?><input id="gender_2" name="gender" type="radio" class="radio" value="1" checked="checked">女
                        <?php else: ?>
                            <input id="gender_2" name="gender" type="radio" class="radio" value="1">女<?php endif; ?>
                        </span>
                    </li>
                    
                    <li class="tips" id="error_gender"></li>
                </ul>

                <!-- 手机号-->
                <ul id="ul_select_address">
                    <li class="title">手机号</li>
                     <li class="form"><input type="text" class="input_big input_400x40" id="phone" name="phone" value="<?php echo ($account['phone']); ?>"></li>
                    <li class="tips" id="error_phone"> </li>
                    <div class="clear"></div>
                </ul>

                 <!--邮箱 -->
                <ul>
                    <li class="title">邮箱</li>
                     <li class="form"><input type="text" class="input_big input_400x40" id="email" name="email" value="<?php echo ($account['email']); ?>"></li>
                    <li class="tips" id="error_email"> </li>
                    <div class="clear"></div>
                </ul>
 
                <div class="clear"></div>
                <div class="boxBtn">
                  <a class="btn_small btn_orange btn_100x40" href="javascript:save_base(this);">保存</a>
                </div>
              </div>
        </div>
        
    </div>
    <div class="clear"></div>
<div class="clear"></div></div>
</form>
<script src="/Public/Static/jquery-1.9.1.min.js"></script>
<script src="/Public/Home/js/aaa.js"></script>
<script src="/Public/Home/js/jquery.validate.min.js"></script>
<script>
$(function(){
	form_validate();
});
function save_base(obj) {
	$("#account_base").submit();
}

function form_validate() {
	jQuery.validator.addMethod('account_phone',
		function(){
		  var phone = $("#phone").val();
		  var reg=/^(0|86|17951)?(13|15|18|14|17)\d{9}$/;
		  return  reg.test($.trim(phone));
	},'<font color=\'red\'>请填写正确的手机号!<font>');
	$("#account_base").validate({
		rules:{
			'number': {
				required: true,
				number: true
			},
            'phone': {
            	required: true,
            	account_phone: true
            },
            'email': {
            	required: true,
            	email: true
            }
		},
		messages:{
			'number':{
				required: "<font color='red'>学号不能为空!<font>",
				number: "<font color=\'red\'>学号只能是数字!<font>"
			},
			'phone':{
				required: "<font color='red'>手机号不能为空！<font>"
			},
			'email':{
				required: "<font color='red'>邮箱不能为空!<font>",
				email: "<font color='red'>请填写正确的邮箱地址!<font>"
			}
		},
		errorPlacement:function(error,element) {
			if (element.is("input[name='number']")) {
				$("#error_number").html(error);
			} else if (element.is("input[name='phone']")) {
				$("#error_phone").html(error);
			} else if (element.is("input[name='email']")) {
                $("#error_email").html(error);
            }
		}
	});
}
</script>
</body>
</html>